package xin.lhuo.we.server.service;

import xin.lhuo.we.server.entity.Document;
import xin.lhuo.we.server.entity.Folder;
import xin.lhuo.we.server.utils.PageBean;

import java.io.InputStream;
import java.util.List;

/**
 * @author Lhuo
 * @date 2019/5/25 16:20
 */
public interface IDocumentService {
    void createFolder(Integer userId, String folderName);

    List<Folder> getFolder(Integer userId);

    void renameFolder(Integer id, String folderName, Integer userId);

    void deleteFolder(Integer id, Integer userId);

    String getUpdateToken();

    /**
     * 七牛上传成功回调
     * @param authorization
     * @param inputStream
     */
    void saveDocument(String authorization, InputStream inputStream) throws Exception;

    List<Document> getDocuments(Integer folderId);

    PageBean<Document> getDocumentPages(Integer folderId, int currentPage, int pageSize);

    void deleteDocument(Integer id,Integer userId,String key);

    void renameDocument(Integer id,String name,Integer userId);
}
